using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using Project.Ime.Properties;

namespace Project.Ime
{
	public partial class OptionsDialog : Form
	{
		public OptionsDialog()
		{
			InitializeComponent();

			// Apply settings
			if (Settings.Default.CopyFormat == "Short")
				m_radioButtonShort.Checked = true;
			else if (Settings.Default.CopyFormat == "Long")
				m_radioButtonLong.Checked = true;
			else
				m_radioButtonFull.Checked = true;

			m_checkBoxOverride.Checked = Settings.Default.OverrideDrive;
			m_textBoxDrive.Enabled = m_checkBoxOverride.Checked;
			m_textBoxDrive.Text = Settings.Default.OverridePath;
		}

		public string CopyFormat
		{
			get
			{
				if (m_radioButtonShort.Checked)
					return "Short";
				else if (m_radioButtonLong.Checked)
					return "Long";
				else
					return "Full";
			}
		}

		public bool OverrideDrive
		{
			get { return m_checkBoxOverride.Checked; }
		}

		public string OverridePath
		{
			get { return m_textBoxDrive.Text; }
		}

		private void HandleCheckChanged(object sender, EventArgs e)
		{
			m_textBoxDrive.Enabled = m_checkBoxOverride.Checked;
		}
	}
}